var count;
function bindButtonStyle() {
    var inputs = document.getElementsByTagName("input");
    for(var i=0;i<inputs.length;i++){
        var input = inputs[i];
        if("button" == input.type || "submit" == input.type) input.className = "button";
    }    
}
// DOM2
if ( typeof window.addEventListener != "undefined" ) 
	window.addEventListener( "load", bindButtonStyle, false );
// IE 
else if ( typeof window.attachEvent != "undefined" ) {
	window.attachEvent( "onload", bindButtonStyle );
}

function disableButton() {
    var inputs = document.getElementsByTagName("input");
    for(var i=0;i<inputs.length;i++){
        var input = inputs[i];
        if("button" == input.type || "submit" == input.type) {
        	input.disabled = true;
        }
    }
    return true;
}
function disableButtonTemporarily() {
    var inputs = document.getElementsByTagName("input");
    for(var i=0;i<inputs.length;i++){
        var input = inputs[i];
        if("button" == input.type || "submit" == input.type) {
        	input.disabled = true;
        }
    }
    count = setInterval("showButton()",10000);
    return true;
}
function showButton(){
    var inputs = document.getElementsByTagName("input");
    for(var i=0;i<inputs.length;i++){
        var input = inputs[i];
        if("button" == input.type || "submit" == input.type) {
        	input.disabled = false;
        }
    }
	clearInterval(count);
}